package com.hyl.domain.activity.model.valobj;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

import javax.swing.text.html.HTML;

@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum DiscountTypeEnum {


    BASE(0,"基础优惠"),
    TAG(1,"人群标签"),
        ;

    private Integer code;
    private String info;

    public static DiscountTypeEnum get(Integer  code){
        switch (code){
            case 0:
                return DiscountTypeEnum.BASE;
            case 1:
                return DiscountTypeEnum.TAG;
                default:
                    throw new RuntimeException("不存在的优惠类型");
        }
    }


}
